package com.maixy.studyonlineapi.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.maixy.studyonlineapi.entity.Activity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Classname ActivityMapper
 * @Description TODO
 * @Date 2020/11/8 18:50
 * @Author by maixy
 */
@Mapper
public interface ActivityMapper extends BaseMapper<Activity> {
    List<Activity> getMyActivityList(@Param("activitySearch") String activitySearch, @Param("activityType") Integer activityType,
                                     @Param("userId") Long userId, @Param("beginIndex") Integer beginIndex,
                                     @Param("pageSize") Integer pageSize);

    List<Activity> getJoinActivityList(@Param("userId") Long userId, @Param("beginIndex") Integer beginIndex,
                                     @Param("pageSize") Integer pageSize);

    List<Activity> getNewActivityList(@Param("activityType") Integer activityType, @Param("beginIndex") Integer beginIndex,
                                      @Param("pageSize") Integer pageSize);

    List<Activity> getHotActivityList(@Param("activityType") Integer activityType, @Param("beginIndex") Integer beginIndex,
                                      @Param("pageSize") Integer pageSize);

    List<Activity> discoverActivityList(@Param("activitySearch") String activitySearch, @Param("activityType") Integer activityType,
                                        @Param("beginIndex") Integer beginIndex, @Param("pageSize") Integer pageSize);

    List<Activity> getActivityList(@Param("activitySearch") String activitySearch, @Param("activityType") Integer activityType,
                                   @Param("activityStatus") Integer activityStatus,@Param("beginIndex") Integer beginIndex,
                                   @Param("pageSize") Integer pageSize);
}
